import pymysql

db = pymysql.connect(
        host='192.168.28.59',
        port=3306,
        user='fjyl_wujun',
        password='SU2RZvgV3eCS5Bpq',
        charset='utf8',
        database='lbwan_v4_user_db'
    )
file_username = open(r'unity_username.txt', mode='r')
sql_name = file_username.read()
cur = db.cursor()
cur.execute("SELECT realname_status FROM user_main WHERE user_name = %s",sql_name)
name = cur.fetchall()
#print(name[0][0])
if name == 3:
    print("数据库验证成功")
else:
    print("数据库验证失败")